package grest.model;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.sql.*;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author Santiago, Agustin, Rodrigo
 */
public class StoredProcedure {
        private ArrayList<Object> paramIn;
        private ArrayList<Integer> paramOut;
        private String name;
        private Boolean selectable;
        
   public StoredProcedure(String name,ArrayList<Object> paramIn,ArrayList<Integer> paramOut,Boolean selectable){
       this.name = name;
       this.paramIn= paramIn;
       this.paramOut = paramOut;
       this.selectable = selectable;
   }
   
   public StoredProcedure(String name,Boolean selectable){
       this.name = name;
       this.paramIn = new ArrayList<Object>();
       this.paramOut = new ArrayList<Integer>();
       this.selectable = selectable;
   }
   
   public String getName(){
       return this.name;
   }
   
   public Boolean isSelectable(){
       return this.selectable;
   }
   
   public void addParamIn(Object o){
       this.paramIn.add(o);
   }
   
   public void addParamOut(Integer o){
       this.paramOut.add(o);
   }
   
   public void setParamValue(Integer index,Object value){
       this.paramIn.set(index, value);
   }
   
   public void deleteParam(Integer index){
       this.paramIn.remove(index);
   }
   
   public ArrayList<Object> getParamsIn(){
       return this.paramIn;
   }  
   
   public ArrayList<Integer> getParamsOut(){
       return this.paramOut;
   }
   public String toString(){
       return this.name;
   }
}